<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    info: { type: Object, required: true },
  },
});
</script>

<template>
  <view class="task-item">
    <view class="task-item-desc">
      <view class="task-item-desc2">{{ info.desc }}</view>
    </view>
    <view class="task-item-content">
      <image
        class="task-item-logo"
        :src="info.travel_agency_logo || info.user_logo"
        mode="aspectFill"
      />
      <view class="task-item-name">
        {{ info.travel_agency_name || info.user_name }}
      </view>
      <view class="task-item-date">{{ info.cdate }}</view>
    </view>
  </view>
</template>

<style lang="scss">
.task-item {
  padding: 30rpx;

  .task-item-desc {
    height: 280rpx;
    margin-bottom: 20rpx;
  }

  .task-item-desc2 {
    font-size: 28rpx;
    color: #333333;
    line-height: 40rpx;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .task-item-content {
    position: relative;
    padding-left: 50rpx;
    padding-top: 4rpx;
  }

  .task-item-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 40rpx;
    height: 40rpx;
    border-radius: 50%;
  }

  .task-item-name {
    font-size: 22rpx;
    color: #999999;
    line-height: 32rpx;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .task-item-date {
    font-size: 20rpx;
    color: #999999;
    line-height: 28rpx;
  }
}
</style>